<?

session_start();
REQUIRE ("../../../include/protect/connect.php");             //Pour se connecter a la base.
REQUIRE ("../../../include/fonction.php");             //Pour les fonction PHP


$PAGE="<SCRIPT TYPE=\"text/javascript\" SRC=\"../../../include/common_script.js\"></SCRIPT>";



//PAge qui sert a modifier la page des modifications d'articles.





$_ID=$article;
SESSION_REGISTER("_ID");

$QUERY="SELECT article_code, article_designation, article_prix_htva,article_code_tva,article_ncadeau FROM article WHERE article_id=$article";
$resultat=mysql_query($QUERY);
$tmp=mysql_fetch_array($resultat);

$tmp[1]=addslashes($tmp[1]);
$tmp[0]=addslashes($tmp[0]);

$ptvac=$tmp[2]-($tmp[2]*($tmp[3]/100));

$PAGE.="<script language=\"javascript\">
           parent.document.form_article.reference.value='$tmp[0]';
           parent.document.form_article.designation.value='$tmp[1]';
           parent.document.form_article.PU.value='$tmp[2]';
           parent.document.form_article.TVA.value='$tmp[3]';
           parent.document.form_article.PUTVAC.value='$ptvac';
            parent.document.form_article.article.value=$article;
             parent.document.form_article.cadeau.value='$tmp[4]';

</script> ";
mysql_close(); ECHO $PAGE;  EXIT;
       
?>
